current version 1.5 - 22nd July 2024
version | date | comment |
---|---|---|
1.0 | 03/Jun/2011 | Original code |
1.1 | 25/Nov/2016 | added WriteDataFileUnit routine |
1.2 | 02/Feb/2023 | added AssignDataFromGrid |
1.3 | 18/Feb/2023 | optional scaleFactor in AssignDataFromGrid |
1.4 | 07/Jun/2024 | changed # with DateTime in output file header |
1.5 | 22/Jul/2024 | updated the synchronization of time of data to read |
license: GNU GPL http://www.gnu.org/licenses/
set of fortran routines to manage a group of stations (surface meteorological or other stations) spread over a given area for making regular observations.
defintion of Observation type definition of ObservationalNetwork type
assign data to a network from grid_real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grid_real), | intent(in) | :: | grid | |||
type(ObservationalNetwork), | intent(inout) | :: | network | |||
real(kind=float), | intent(in), | optional | :: | scaleFactor |
read data from file unit. Data spanned on multiple time steps can be aggregated computing average, cumulated, maximum or minimum. Aggregated value is considered as missing if number of actual available observations is less than a given percentage (tresh)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(inout) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit | |||
type(DateTime), | intent(in), | optional | :: | time | ||
integer(kind=short), | intent(in), | optional | :: | aggr_time | ||
character(len=*), | intent(in), | optional | :: | aggr_type | ||
real(kind=float), | intent(in), | optional | :: | tresh |
read metadata section from file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename | |||
type(ObservationalNetwork), | intent(out) | :: | network |
read metadata section from open unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=short), | intent(in) | :: | fileunit | |||
type(ObservationalNetwork), | intent(out) | :: | network |
write data from file unit. if optional argument init is true a string to initialize data section of file is written
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit | |||
logical, | intent(in), | optional | :: | init |
write metadata section to file TODO: full CRS support
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
character(len=*), | intent(in) | :: | filename |
write metadata section to open file unit TODO: full CRS support
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=20), | public | :: | id |
identification code |
|||
character(len=300), | public | :: | name |
name of observational site |
|||
real(kind=float), | public | :: | value |
The observation value itself |
|||
type(Coordinate), | public | :: | xyz |
easting, northing and elevation in real world |
|||
real(kind=float), | public | :: | z |
elevation [m] a.s.l. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | countObs |
number of observations in network |
|||
integer(kind=short), | public | :: | dataType |
1 = continuous, 2 = cumulative, 3 = incremental, 4 = average, 5 = maximum, 6 = minimum |
|||
character(len=300), | public | :: | description |
The name of the physical, chemical, or biological quantity that the value represents (e.g. streamflow, precipitation, water quality) |
|||
integer(kind=short), | public | :: | epsg | ||||
type(CRS), | public | :: | mapping | ||||
real(kind=float), | public | :: | nodata |
conventional code for missing data |
|||
type(Observation), | public, | ALLOCATABLE | :: | obs(:) |
arbitrary observations in network |
||
real(kind=float), | public | :: | offsetZ |
offset from ground elevation [m] |
|||
character(len=300), | public | :: | path |
filesystem path of file containing observations |
|||
logical, | public | :: | syncData | = | .FALSE. |
true when network is synchronized to data section in file |
|
type(DateTime), | public | :: | time |
The date and time of the observations |
|||
integer(kind=short), | public | :: | timeIncrement | ||||
character(len=100), | public | :: | unit |
unit of measure |
count number of observations different from missing data Can optionally return network containing actual measurements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
integer(kind=short), | intent(out) | :: | count | |||
type(ObservationalNetwork), | intent(out), | optional | :: | activeNetwork |
make a copy of one observational network
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | input | |||
type(ObservationalNetwork), | intent(inout) | :: | output |
deallocate space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(inout) | :: | network |
assign data to a network from grid_real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(grid_real), | intent(in) | :: | grid | |||
type(ObservationalNetwork), | intent(inout) | :: | network | |||
real(kind=float), | intent(in), | optional | :: | scaleFactor |
read data from file unit. Data spanned on multiple time steps can be aggregated computing average, cumulated, maximum or minimum. Aggregated value is considered as missing if number of actual available observations is less than a given percentage (tresh)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(inout) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit | |||
type(DateTime), | intent(in), | optional | :: | time | ||
integer(kind=short), | intent(in), | optional | :: | aggr_time | ||
character(len=*), | intent(in), | optional | :: | aggr_type | ||
real(kind=float), | intent(in), | optional | :: | tresh |
read metadata section from file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename | |||
type(ObservationalNetwork), | intent(out) | :: | network |
read metadata section from open unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=short), | intent(in) | :: | fileunit | |||
type(ObservationalNetwork), | intent(out) | :: | network |
write data from file unit. if optional argument init is true a string to initialize data section of file is written
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit | |||
logical, | intent(in), | optional | :: | init |
write metadata section to file TODO: full CRS support
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
character(len=*), | intent(in) | :: | filename |
write metadata section to open file unit TODO: full CRS support
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ObservationalNetwork), | intent(in) | :: | network | |||
integer(kind=short), | intent(in) | :: | fileunit |